home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3032 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  803 b 

  1. Path: ix.netcom.com!netnews
  2. From: wkdugan@ix.netcom.com (Bill Dugan)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: [Q] Best way to "define" flag values?
  5. Date: Sun, 21 Jan 1996 19:07:13 GMT
  6. Organization: Netcom
  7. Message-ID: <4du2ug$nqt@ixnews8.ix.netcom.com>
  8. References: <marnoldDLIv9w.1s4@netcom.com>
  9. NNTP-Posting-Host: lax-ca22-16.ix.netcom.com
  10. X-NETCOM-Date: Sun Jan 21 11:08:09 AM PST 1996
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. marnold@netcom.com (Matt Arnold) wrote:
  14.  
  15. snip
  16.  
  17. >However, I have never quite found a good substitute for declaring
  18. >values for flags.  Passing flags to a function, for instance, is
  19. >a very common construct, and it's typically arranged like so...
  20.  
  21. >   #define FLAG_A 0x0001
  22. >   #define FLAG_B 0x0010
  23. >   #define FLAG_C 0x0100
  24.  
  25. snip
  26.  
  27. Look up bit fields in your C or C++ reference.
  28.  
  29.